package com.yunmai.cloud.web.repositories.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yunmai.cloud.web.domain.RealDatasEntity;
import com.yunmai.cloud.web.repositories.IRealDatasRepository;
import com.yunmai.cloud.web.repositories.orm.IRealDatasMapper;
import com.yunmai.core.spring.mybatis.repositories.SimpleRepositoryImpl;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  仓库层实现类
 * </p>
 *
 * @author 赵刚
 * @since 2023-01-11
 **/
@Repository
public class RealDatasRepositoryImpl extends SimpleRepositoryImpl<IRealDatasMapper, RealDatasEntity> implements IRealDatasRepository {
    @Override
    public RealDatasEntity getByStationId(Long stationId) {
        LambdaQueryWrapper<RealDatasEntity> queryWrapper= Wrappers.lambdaQuery();
        queryWrapper.eq(RealDatasEntity::getStationId,stationId);
        return getOne(queryWrapper);
    }
}
